package com.iris.live.services.services;

import com.iris.live.services.data.models.Lsh市场设置Model;
import com.iris.live.services.data.models.Lsh待办事项Model;
import com.iris.live.services.data.models.Lsh活动发起设置Model;
import com.iris.live.services.data.models.Lsh消息Model;
import com.iris.live.services.models.RequestBase;
import com.iris.live.services.models.ResultData;

import java.sql.Timestamp;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by ThinkPad on 2016/9/17.
 */
public interface MessageService {

    public ResultData getClientInfoByTel(MessageService.SaveActivityInviteRequest req, String permit, String username);

    public List getLatestAppointmentMsg(GetAppointmentMsgRequest request);

    public boolean delAppointmentMsgById(GetAppointmentMsgRequest request);

    public List getLshMessageByIdAndPermit(GetLshMessageRequest request);

    public Lsh消息Model saveLshMessageModel(Lsh消息Model model);

    public boolean delLshMessageById(Integer id);

    public Lsh待办事项Model saveAppointmentMsg(Lsh待办事项Model model);

    public boolean isExistActivity(GetLshActivityRequest request);

    public List<Lsh市场设置Model> getMarketId(Lsh市场设置Model req);

    public boolean saveLinkedActivity(MessageService.GetLshActivityRequest request);

    public ResultData isAvailableClue(GetLshActivityRequest request);

    public List getFollowingCustomer(GetLshActivityRequest request);

    public Map saveImportRecords(List<GetLsh导入名单Request> modelList);

    public boolean saveAppointmentMsgs(GetAppointmentMsgRequest req) throws ParseException;

    public List getActivityInviteList(GetLshActivityRequest req);

    List getActivityBeforInviteList(String dlr, List<GetLshActivityRequest> req);

    public List getActivityAfterInviteList(List<GetLshActivityRequest> req);

    ResultData saveActivityBeforInviteList(String dealer, String user, List<SaveActivityInviteRequest> req);

    public Map saveActivityAfterInviteList(List<SaveActivityInviteRequest> req);

    public List getLshActivitySet();

    public Map saveLshActivitySet(List<Lsh活动发起设置Model> reqList);

    public boolean updateStatusById(Lsh活动发起设置Model req);

    ResultData getClientInfoByTelOverWrite(GetClientInfoByTelOverWrite getClientInfoByTelOverWrite, String permit, String username);

    static class GetAppointmentMsgRequest {
        public Integer subNum;//附属编号
        public Integer AppointmentId;//待办编号
        public String permit;//许可
        //lsh代办事项参数
        public String 许可;
        public String 销售顾问;
        public String 待办分类;
        public String 待办子类;
        public String 待办小类;
        public Timestamp 开始时间;
        public Timestamp 结束时间;
        public String 内容;
        public String 备注;
        public String 附属编号类型;
        public Integer 附属编号;
        public String 更新账号;
        public Timestamp 更新时间;
        //lsh消息参数
        public String 发送许可;
        public String 发送人;
        public String 接收许可;
        public String 接收人;
        public String 消息分类;
        public String 消息内容;
        public String 消息附属Id;
        public String 附属Id类型;
        public String 消息备注;
        public Date 消息创建时间;
        public String 删除账号;
        public Timestamp 比较时间;
    }

    static class GetLshMessageRequest {
        public String permit;
        public String subStringInfo;//消息附属id

    }

    static class GetLshActivityRequest {
        public String activityCode;//活动代码
        public String permit;
        public Integer importId;//导入编号
        public String activityCodeList;//活动编号list
        public String phone;
        public String 所属CDO;
        public String 人员姓名;
        public String 销售顾问姓名;
        public String 是否展厅;
    }
    static class GetLsh导入名单Request {
        //LSH导入名单参数
        public Integer 导入编号;
        public String 许可;
        public String 顾客姓名;
        public String 电话号码;
        public String 顾客性别;
        public String 渠道;
        public String 来源;
        public Integer 市场编号;
        public Integer 车型编号;
        public String 保有品牌;
        public String 保有月数;
        public java.sql.Date 预计购车日期;
        public String 客户级别;
        public String 是否同行;
        public Integer 同行人数;
        public String 是否试驾;
        public String 是否评估;
        public String 是否置换;
        public String 是否金融;
        public String 是否线索;
        public String 是否有效线索;
        public String 备注;
        public java.sql.Date 导入日期;
        public String 所属CDO;
        public String 所属销售顾问;
        public Timestamp 下次跟进日期;
        public java.sql.Date 线索创建日期;
        public Integer 预约编号;
        public Integer 顾客编号;
        public Integer 推荐人顾客编号;
        public String 战败去向;
        public String 战败去向备注;
        public String 更新账号;
        public Timestamp 更新时间;

        //其他参数
        public String phone推荐人;
        public String 活动代码;
        public String 来源分类;
        public Timestamp 预约时间;
        public String 预约销售顾问;
        public Timestamp 结束时间;
    }

    static class SaveActivityInviteRequest extends RequestBase {
        //保存活动前后的参数
        public Integer 活动编号;
        public String 许可;
        public String 顾客姓名;
        public String 电话号码;
        public String 顾客性别;
        public String 渠道;
        public String 来源;
        public String 客户级别;
        //        public String 是否线索;
//        public String 是否有效线索;
        public java.sql.Date 导入日期;
        public String 更新账号;
        //        public String 更新时间;
        public String 所属CDO;
        public String 所属销售顾问;
        public Date 活动开始日期;
        public Date 活动结束日期;
        public String 来源分类;
        public String 市场来源;
        public String 品牌;
        public String 级别;
        public String 活动名称;
        public String 是否展厅;
        public String 参加市场活动日期;
        public String 是否为新增线索;
    }

    static class GetClientInfoByTelOverWrite {
        public String tel;
    }
}
